﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Internal.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    待审批物料列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptStyleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        var list = ViewData["materialList"] as Webdiyer.WebControls.Mvc.PagedList<BPM.Entity.MaterialDefinition>;
    %>
    <%
        if (list != null && list.Count > 0)
        { %>
    <table class="altTable" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <td>
                    图片
                </td>
                <td>
                    物料条码
                </td>
                <td>
                    物料名称
                </td>
                <td>
                    提交人
                </td>
                <td>
                    所属大类
                </td>
                <td>
                    所属小类
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </thead>
        <tbody>
            <% foreach (BPM.Entity.MaterialDefinition item in list)
               {
            %>
            <tr>
                <td>
                    <img alt="物料图片" src="<%= Url.Content(item.ImagePath) %>" />
                </td>
                <td>
                    <%= item.Barcode.Number %>
                </td>
                <td>
                    <%= item.Name %>
                </td>
                <td>
                    <%= item.Creator.RealName %>
                </td>
                <td>
                    <%= item.Category.ParentCategory.Name %>
                </td>
                <td>
                    <%= item.Category.Name %>
                </td>
                <td>
                    <%= Html.ActionLink("查看", "ViewPendingMaterial", new { id = item.Id })%>
                </td>
            </tr>
            <%} %>
        </tbody>
    </table>
    <%= Html.Pager(list, new PagerOptions
{
    PageIndexParameterName = "pageIndex",
    FirstPageText = "首页",
    LastPageText="尾页", NextPageText="下页", PrevPageText="上页"}) %>
    <%}
        else
        { %>
    <p>
        当前没有待审核的物料!
    </p>
    <%} %>
</asp:Content>
